<%--<%@ page import="com.lengmou.entity.User" %>--%>
<%@ page import="com.lengmou.service.CarsService" %>
<%@ page import="com.lengmou.service.impl.CarsServiceImpl" %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<header class="func-header-box fixed">
    <link rel="stylesheet" href="http://masadora-js.masadora.net/masadora_omega/static/css/index.css?_r=73491522">
    <div class="ui-layout">
        <a href="index.jsp"><h1>首页</h1></a>
        <nav>
            <a href="goods/search" class="active">商品列表</a>
            <a href="message.jsp">评价</a>
            <%--<div class="item func-glb-header-nav-pop-box">--%>
                <%--<a href="http://www.masadora.jp/"><b>masa</b>dora<sup>.jp</sup></a>--%>
                <%--<div class="menu-box">--%>
                    <%--<a href="http://www.masadora.jp/dg.htm">代购</a>--%>
                    <%--<a href="http://www.masadora.jp/teleport.htm">转运</a>--%>
                    <%--<a href="http://www.masadora.jp/groupDeliveryCenter.htm">拼单</a>--%>
                <%--</div>--%>
            </div>
        </nav>
        <div class="ctrl-box">
            <div class="ctrl-item" type="cart">
                <a href="cars.jsp">
                    <i class="ui-icon ui-icon-cart"></i>
                    <%--<%--%>
                        <%--User user = (User) request.getSession().getAttribute("user");--%>
                        <%--CarsService cs = new CarsServiceImpl();--%>
                        <%--if(user!=null){--%>
                            <%--int i = cs.contCarNum(user.getId());--%>
                            <%--pageContext.setAttribute("carnum",i);--%>
                        <%--}--%>
                    <%--%>--%>
                    <span class="num">${carnum}</span>
                </a>
            </div>

            <div class="ctrl-item" type="user">
                <c:choose>
                    <c:when test="${sessionScope.user!=null}">
                        <div class="a">
                            <a href="user.jsp" id="user" date-userid="${sessionScope.user.id}" >${sessionScope.user.username}</a>
                            <span class="color-gray">/</span>
                            <a href="exit" >注销</a>
                        </div>
                    </c:when>
                    <c:otherwise>
                        <div class="a"><a href="login.jsp">登录</a> <span class="color-gray">/</span> <a href="login.jsp">注册</a></div>
                    </c:otherwise>
                </c:choose>
            </div>
            <div class="ctrl-item" type="phone">
                <!-- APP下载导航页面 href -->
                <a href="http://www.masadora.net/app.htm?pttag=masa"><i class="ui-icon ui-icon-phone"></i></a>

                <div class="pop-box header-nav-app-pop-box">
                    <div class="cover-box">
                        <!-- APP下载二维码地址 src -->
                        <img src="http://cdn.masadora.net/new_masadora/images/avatars/20190704/net-ptag-masa.png">
                    </div>
                    <p>扫码下载手机客户端</p>
                </div>
            </div>
        </div>

        <a class="search-btn" href="http://mall.masadora.net/product/search?keyword=">搜索商品，快来试试~</a>
    </div>
</header>
